package com.syezon.wifikey.pwd.info;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.PrimaryKey;

import com.syezon.wifikey.wifi.info.WifiInfo;

/**
 * Created by Administrator on 2018/9/10.
 */

@Entity(tableName = "t_wifi_pwd")
public class SaveWifiPwdInfo {

    @PrimaryKey(autoGenerate = true)
    private long id;
    @ColumnInfo(name = "ssid")
    private String ssid;
    @ColumnInfo(name = "pwd")
    private String pwd;
    @ColumnInfo(name = "comment")
    private String comment;
    @ColumnInfo(name = "time")
    private long time;
    @ColumnInfo(name = "connect_time")
    private int connectTime;

    @Ignore
    private WifiInfo wifiInfo;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getSsid() {
        return ssid;
    }

    public void setSsid(String ssid) {
        this.ssid = ssid;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public int getConnectTime() {
        return connectTime;
    }

    public void setConnectTime(int connectTime) {
        this.connectTime = connectTime;
    }

    public WifiInfo getWifiInfo() {
        return wifiInfo;
    }

    public void setWifiInfo(WifiInfo wifiInfo) {
        this.wifiInfo = wifiInfo;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof SaveWifiPwdInfo) {
            if (id == ((SaveWifiPwdInfo) obj).getId()) {
                return true;
            }
        }
        return false;
    }
}
